<div [ngStyle]="{'height':screenheight+'px','width':screenWidth+'px','overflow-y':'auto'}" class="col-md-12">

    <div class="form-group">
        <label>选择班级课表</label>
        <input-select [ApiUrl]="'Public/ClassesList'" (myModelChange)="myModelChange($event)" [multiple]="false">
        </input-select>
    </div>
    <div *ngIf="this.courseDic">
        <div class="form-group">
            <table width="100%" border="1" cellpadding="5">
                <tr>
                    <td colspan="8">选择两个课时</td>
                </tr>
                <tr>
                    <td>节数</td>
                    <td>周一</td>
                    <td>周二</td>
                    <td>周三</td>
                    <td>周四</td>
                    <td>周五</td>
                    <td>周六</td>
                </tr>
                <tr>
                    <td>第一节</td>
                    <td (click)="clickCourse('a11',dialog)"><span
                            *ngIf='this.courseDic["a11"].teacher_name'>{{this.courseDic["a11"].teacher_name}}:{{this.courseDic["a11"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a12',dialog)"><span
                            *ngIf='this.courseDic["a12"].teacher_name'>{{this.courseDic["a12"].teacher_name}}:{{this.courseDic["a12"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a13',dialog)"><span
                            *ngIf='this.courseDic["a13"].teacher_name'>{{this.courseDic["a13"].teacher_name}}:{{this.courseDic["a13"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a14',dialog)"><span
                            *ngIf='this.courseDic["a14"].teacher_name'>{{this.courseDic["a14"].teacher_name}}:{{this.courseDic["a14"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a15',dialog)"><span
                            *ngIf='this.courseDic["a15"].teacher_name'>{{this.courseDic["a15"].teacher_name}}:{{this.courseDic["a15"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a16',dialog)"><span
                            *ngIf='this.courseDic["a16"].teacher_name'>{{this.courseDic["a16"].teacher_name}}:{{this.courseDic["a16"].course_name}}</span>
                    </td>
                </tr>
                <tr>
                    <td>第二节</td>
                    <td (click)="clickCourse('a21',dialog)"><span
                            *ngIf='this.courseDic["a21"].teacher_name'>{{this.courseDic["a21"].teacher_name}}:{{this.courseDic["a21"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a22',dialog)"><span
                            *ngIf='this.courseDic["a22"].teacher_name'>{{this.courseDic["a22"].teacher_name}}:{{this.courseDic["a22"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a23',dialog)"><span
                            *ngIf='this.courseDic["a23"].teacher_name'>{{this.courseDic["a23"].teacher_name}}:{{this.courseDic["a23"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a24',dialog)"><span
                            *ngIf='this.courseDic["a24"].teacher_name'>{{this.courseDic["a24"].teacher_name}}:{{this.courseDic["a24"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a25',dialog)"><span
                            *ngIf='this.courseDic["a25"].teacher_name'>{{this.courseDic["a25"].teacher_name}}:{{this.courseDic["a25"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a26',dialog)"><span
                            *ngIf='this.courseDic["a26"].teacher_name'>{{this.courseDic["a26"].teacher_name}}:{{this.courseDic["a26"].course_name}}</span>
                    </td>
                </tr>
                <tr>
                    <td>第三节</td>
                    <td (click)="clickCourse('a31',dialog)"><span
                            *ngIf='this.courseDic["a31"].teacher_name'>{{this.courseDic["a31"].teacher_name}}:{{this.courseDic["a31"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a32',dialog)"><span
                            *ngIf='this.courseDic["a32"].teacher_name'>{{this.courseDic["a32"].teacher_name}}:{{this.courseDic["a32"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a33',dialog)"><span
                            *ngIf='this.courseDic["a33"].teacher_name'>{{this.courseDic["a33"].teacher_name}}:{{this.courseDic["a33"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a34',dialog)"><span
                            *ngIf='this.courseDic["a34"].teacher_name'>{{this.courseDic["a34"].teacher_name}}:{{this.courseDic["a34"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a35',dialog)"><span
                            *ngIf='this.courseDic["a35"].teacher_name'>{{this.courseDic["a35"].teacher_name}}:{{this.courseDic["a35"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a36',dialog)"><span
                            *ngIf='this.courseDic["a36"].teacher_name'>{{this.courseDic["a36"].teacher_name}}:{{this.courseDic["a36"].course_name}}</span>
                    </td>
                </tr>
                <tr>
                    <td>第四节</td>
                    <td (click)="clickCourse('a41',dialog)"><span
                            *ngIf='this.courseDic["a41"].teacher_name'>{{this.courseDic["a41"].teacher_name}}:{{this.courseDic["a41"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a42',dialog)"><span
                            *ngIf='this.courseDic["a42"].teacher_name'>{{this.courseDic["a42"].teacher_name}}:{{this.courseDic["a42"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a43',dialog)"><span
                            *ngIf='this.courseDic["a43"].teacher_name'>{{this.courseDic["a43"].teacher_name}}:{{this.courseDic["a43"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a44',dialog)"><span
                            *ngIf='this.courseDic["a44"].teacher_name'>{{this.courseDic["a44"].teacher_name}}:{{this.courseDic["a44"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a45',dialog)"><span
                            *ngIf='this.courseDic["a45"].teacher_name'>{{this.courseDic["a45"].teacher_name}}:{{this.courseDic["a45"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a46',dialog)"><span
                            *ngIf='this.courseDic["a46"].teacher_name'>{{this.courseDic["a46"].teacher_name}}:{{this.courseDic["a46"].course_name}}</span>
                    </td>
                </tr>
                <tr>
                    <td>第五节</td>
                    <td (click)="clickCourse('a51',dialog)"><span
                            *ngIf='this.courseDic["a51"].teacher_name'>{{this.courseDic["a51"].teacher_name}}:{{this.courseDic["a51"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a52',dialog)"><span
                            *ngIf='this.courseDic["a52"].teacher_name'>{{this.courseDic["a52"].teacher_name}}:{{this.courseDic["a52"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a53',dialog)"><span
                            *ngIf='this.courseDic["a53"].teacher_name'>{{this.courseDic["a53"].teacher_name}}:{{this.courseDic["a53"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a54',dialog)"><span
                            *ngIf='this.courseDic["a54"].teacher_name'>{{this.courseDic["a54"].teacher_name}}:{{this.courseDic["a54"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a55',dialog)"><span
                            *ngIf='this.courseDic["a55"].teacher_name'>{{this.courseDic["a55"].teacher_name}}:{{this.courseDic["a55"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a56',dialog)"><span
                            *ngIf='this.courseDic["a56"].teacher_name'>{{this.courseDic["a56"].teacher_name}}:{{this.courseDic["a56"].course_name}}</span>
                    </td>
                </tr>
                <tr>
                    <td>第六节</td>
                    <td (click)="clickCourse('a61',dialog)"><span
                            *ngIf='this.courseDic["a61"].teacher_name'>{{this.courseDic["a61"].teacher_name}}:{{this.courseDic["a61"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a62',dialog)"><span
                            *ngIf='this.courseDic["a62"].teacher_name'>{{this.courseDic["a62"].teacher_name}}:{{this.courseDic["a62"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a63',dialog)"><span
                            *ngIf='this.courseDic["a63"].teacher_name'>{{this.courseDic["a63"].teacher_name}}:{{this.courseDic["a63"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a64',dialog)"><span
                            *ngIf='this.courseDic["a64"].teacher_name'>{{this.courseDic["a64"].teacher_name}}:{{this.courseDic["a64"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a65',dialog)"><span
                            *ngIf='this.courseDic["a65"].teacher_name'>{{this.courseDic["a65"].teacher_name}}:{{this.courseDic["a65"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a66',dialog)"><span
                            *ngIf='this.courseDic["a66"].teacher_name'>{{this.courseDic["a66"].teacher_name}}:{{this.courseDic["a66"].course_name}}</span>
                    </td>
                </tr>
                <tr>
                    <td>第七节</td>
                    <td (click)="clickCourse('a71',dialog)"><span
                            *ngIf='this.courseDic["a71"].teacher_name'>{{this.courseDic["a71"].teacher_name}}:{{this.courseDic["a71"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a72',dialog)"><span
                            *ngIf='this.courseDic["a72"].teacher_name'>{{this.courseDic["a72"].teacher_name}}:{{this.courseDic["a72"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a73',dialog)"><span
                            *ngIf='this.courseDic["a73"].teacher_name'>{{this.courseDic["a73"].teacher_name}}:{{this.courseDic["a73"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a74',dialog)"><span
                            *ngIf='this.courseDic["a74"].teacher_name'>{{this.courseDic["a74"].teacher_name}}:{{this.courseDic["a74"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a75',dialog)"><span
                            *ngIf='this.courseDic["a75"].teacher_name'>{{this.courseDic["a75"].teacher_name}}:{{this.courseDic["a75"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a76',dialog)"><span
                            *ngIf='this.courseDic["a76"].teacher_name'>{{this.courseDic["a76"].teacher_name}}:{{this.courseDic["a76"].course_name}}</span>
                    </td>
                </tr>
                <tr>
                    <td>第八节</td>
                    <td (click)="clickCourse('a81',dialog)">
                        <span
                            *ngIf='this.courseDic["a81"].teacher_name'>{{this.courseDic["a81"].teacher_name}}:{{this.courseDic["a81"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a82',dialog)">
                        <span
                            *ngIf='this.courseDic["a82"].teacher_name'>{{this.courseDic["a82"].teacher_name}}:{{this.courseDic["a82"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a83',dialog)">
                        <span
                            *ngIf='this.courseDic["a83"].teacher_name'>{{this.courseDic["a83"].teacher_name}}:{{this.courseDic["a83"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a84',dialog)">
                        <span
                            *ngIf='this.courseDic["a84"].teacher_name'>{{this.courseDic["a84"].teacher_name}}:{{this.courseDic["a84"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a85',dialog)">
                        <span
                            *ngIf='this.courseDic["a85"].teacher_name'>{{this.courseDic["a85"].teacher_name}}:{{this.courseDic["a85"].course_name}}</span>
                    </td>
                    <td (click)="clickCourse('a86',dialog)">
                        <span
                            *ngIf='this.courseDic["a86"].teacher_name'>{{this.courseDic["a86"].teacher_name}}:{{this.courseDic["a86"].course_name}}</span>
                    </td>
                </tr>
            </table>
        </div>

        <div class="form-group" *ngIf="changeList && changeList.length==2">
            <table border="3">
                <tr>
                    <td>课时1</td>
                    <td>
                        {{changeList[0].course_name}}({{changeList[0].order_num}})
                    </td>
                    <td>课时2</td>
                    <td>{{changeList[1].course_name}}({{changeList[1].order_num}})
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td>课时1时间</td>
                    <td>
                        <input nbInput [nbDatepicker]="datepicker1" class="form-control" id="input{{i}}"
                            [(ngModel)]="bean.changeDateStr1">
                        <nb-datepicker #datepicker1 format="yyyy-MM-dd"></nb-datepicker>
                    </td>
                    <td>课时2时间</td>
                    <td><input nbInput [nbDatepicker]="datepicker2" class="form-control" id="input{{i}}"
                            [(ngModel)]="bean.changeDateStr2">
                        <nb-datepicker #datepicker2 format="yyyy-MM-dd"></nb-datepicker>
                    </td>
                    <td>
                        <button type="button" *ngFor="let item of buttons" nbButton (click)="CheckWeekCourseChange()">查看交换信息</button>
                    </td>
                </tr>
                <tr>
                        <td colspan="5" ><textarea rows="5" style="width: 100%;">{{changeMsg}}</textarea></td>
                </tr>
                
            </table>
        </div>

    </div>
</div>

<div class="modal-footer">
    <button type="button" *ngFor="let item of buttons" nbButton (click)="ButtonClick(item.click)">{{item.name}}</button>
</div>